home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / portable / def_shel.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  2KB  |  62 lines

  1. #ifndef NO_MEMORY_H
  2. #include <memory.h>
  3. #endif
  4. #define    CURSES_LIBRARY    1
  5. #include <curses.h>
  6. #undef    def_shell_mode
  7.  
  8. #ifdef PDCDEBUG
  9. char *rcsid_def_shel = "$Header: C:\CURSES\portable\RCS\def_shel.c 2.1 1993/06/18 20:19:45 MH Rel MH $";
  10. #endif
  11.  
  12.  
  13. #ifndef UNIX
  14.  
  15. /*man-start*********************************************************************
  16.  
  17.   def_shell_mode()    - Save terminal mode
  18.  
  19.   X/Open Description:
  20.      Save the current terminal modes as the "program" (in CURSES) or
  21.      "shell" (not in CURSES) state for use by the reset_prog_mode()
  22.      and reset_shell_mode() functions.  This is done automatically by
  23.      initscr().
  24.  
  25.   PDCurses Description:
  26.      PDCurses maintains a WINDOW* that contains the original user's
  27.      screen upon startup.  This might be useful for returning the
  28.      user's environment to its (near) original state.
  29.  
  30.      This is unimplemented at this time.
  31.  
  32.   X/Open Return Value:
  33.      The def_shell_mode() function returns OK on success and ERR on error.
  34.  
  35.   X/Open Errors:
  36.      No errors are defined for this function.
  37.  
  38.   Portability:
  39.      PDCurses    int def_shell_mode( void );
  40.      X/Open Dec '88    int def_shell_mode( void );
  41.      BSD Curses
  42.      SYS V Curses    int def_shell_mode( void );
  43.  
  44. **man-end**********************************************************************/
  45.  
  46. int    def_shell_mode(void)
  47. {
  48. #ifdef PDCDEBUG
  49.     if (trace_on) PDC_debug("def_shell_mode() - called\n");
  50. #endif
  51.  
  52. #ifdef    FLEXOS
  53.     _flexos_8bitmode();
  54. #endif
  55.     c_sh_tty.been_set = TRUE;
  56.  
  57.     memcpy(&c_sh_tty.saved, &_cursvar, sizeof(SCREEN));
  58.  
  59.     return( OK );
  60. }
  61. #endif
  62.